{% extends 'layout.html' %}
{% from 'macro/page.html' import render_pagination %}

{%block title%}
MovieLand-电影列表页
{%endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row row-cols-1 row-cols-md-3">
      {% for movie in movies %}
        <div class="col mb-4">
          <div class="card">
            <a href="{{ url_for('movie_route.movie_desc', movie_id=movie.movie_id) }}"><img src="{{ movie.cover_img }}" class="card-img-top" height="350" alt="..."></a>
            <div class="card-body">
              <a href="{{ url_for('movie_route.movie_desc', movie_id=movie.movie_id) }}"><h5 class="card-title">{{ movie.name }} | {{ movie.publish_year }}</h5></a>
              <!-- <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> -->
            </div>
          </div>
        </div>

      {% endfor %}
    </div>
</div>

{{ render_pagination(pagination, 'movie_route.movie_index') }}

{% endblock %}